import java.util.ArrayList;
import java.util.List;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: 28463
 * Date: 2022—05—25
 * Time: 16:54
 */
class Solution {
    public List<String> fizzBuzz(int n) {
        List<String> answer = new ArrayList<String>();
        for(int i = 1; i <= n; i++){
            StringBuffer sb = new StringBuffer();
            if(i%3 == 0) {
                sb.append("Fizz");
            }
            if(i%5 == 0) {
                sb.append("Buzz");
            }
            if(sb.length() == 0) {
                sb.append(i);
            }
            answer.add(sb.toString());
        }
        return answer;

    }
}
class Solution1 {
    public int numberOfSteps(int num) {
        int count = 0;
        while(num > 0) {
            num = (num % 2 != 0)?(num -1) : (num / 2);
            count++;
        }
        return count;
    }

}
public class Test01 {
    public static void main(String[] args) {

    }
}
